package com.xxl.sso.core.filter;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author fan.tianpeng
 * @date 2021/5/17 16:46
 */
@Component
@ConfigurationProperties(prefix = "xxl.sso")
public class XxlSsoProperties {
    /**
     * sso后端服务地址
     */
    private String server;

    /**
     * 登出地址
     */
    private String logoutPath;

    /**
     * 不需要拦截的url
     */
    private String excludedPaths;

    /**
     * 需要拦截的路径
     */
    private String urlPatterns;

    /**
     * 接入业务系统前端地址
     */
    private String clientWebUrl;
    /**
     * 接收session
     */
    private String receiveSession;
    /**
     * 业务系统是否是前后端分离
     */
    private Boolean redirect = false;

    /**
     * 登录校验开关
     */
    private Boolean enable = false;

    /**
     * 是否仅允许单个客户端登录
     */
    private Boolean singleClientEnable = false;
    
    /**登录地址*/
    private String loginPage;

    /**用户管理页*/
    private String userMgrPage;
    
    private String redirectUrl;
    
    private String toUrl;


    public String getLoginPage() {
		return loginPage;
	}

	public void setLoginPage(String loginPage) {
		this.loginPage = loginPage;
	}

	public String getRedirectUrl() {
		return redirectUrl;
	}

	public void setRedirectUrl(String redirectUrl) {
		this.redirectUrl = redirectUrl;
	}

	public String getToUrl() {
		return toUrl;
	}

	public void setToUrl(String toUrl) {
		this.toUrl = toUrl;
	}

	public String getServer() {
        return server;
    }

    public void setServer(String server) {
        this.server = server;
    }

    public String getLogoutPath() {
        return logoutPath;
    }

    public void setLogoutPath(String logoutPath) {
        this.logoutPath = logoutPath;
    }

    public String getExcludedPaths() {
        return excludedPaths;
    }

    public void setExcludedPaths(String excludedPaths) {
        this.excludedPaths = excludedPaths;
    }

    public Boolean getEnable() {
        return enable;
    }

    public void setEnable(Boolean enable) {
        this.enable = enable;
    }

    public Boolean getSingleClientEnable() {
        return singleClientEnable;
    }

    public void setSingleClientEnable(Boolean singleClientEnable) {
        this.singleClientEnable = singleClientEnable;
    }

    public String getUrlPatterns() {
        return urlPatterns;
    }

    public void setUrlPatterns(String urlPatterns) {
        this.urlPatterns = urlPatterns;
    }

    public String getClientWebUrl() {
        return clientWebUrl;
    }

    public void setClientWebUrl(String clientWebUrl) {
        this.clientWebUrl = clientWebUrl;
    }

    public String getReceiveSession() {
        return receiveSession;
    }

    public void setReceiveSession(String receiveSession) {
        this.receiveSession = receiveSession;
    }

    public Boolean getRedirect() {
        return redirect;
    }

    public void setRedirect(Boolean redirect) {
        this.redirect = redirect;
    }

    public String getUserMgrPage() {
        return userMgrPage;
    }

    public void setUserMgrPage(String userMgrPage) {
        this.userMgrPage = userMgrPage;
    }
}
